import React from "react";
import Link from "next/link";

export default function Users() {
  const users = [
    {
      id: "summer",
      name: "Summer",
    },
    {
      id: "lucy",
      name: "Lucy",
    },
  ];
  return (
    <>
      <div>所有用户列表</div>
      <ul>
        {/* {users.map((user) =>{
            return( 
            
            )
          }} */}
        {users.map((user) => (
          <li key={user.id}>
            <Link
              href={{
                pathname: "/users/[username]",
                query: { username: user.name },
              }}
            >
              {user.name}
            </Link>
          </li>
        ))}
      </ul>
    </>
  );
}
